import request from '@/ya/request';

const ExamApi = {
	// 查询所有停车数据
	getRoomList: () => {
		return request({
			url: '/system/dict-data/getDict',
			method: 'GET',
			custom: {
				showLoading: false,
				auth: true,
				showError: false, // 不展示错误提示
			},
		});
	},
	// 获取停车详情
	getRoomDetailById: (id) => {
		return request({
			url: '/room/invitation/getInfo',
			method: 'GET',
			params: { id: id },
			custom: {
				showLoading: false,
				loading: false, // 不用加载中
				showError: false, // 不展示错误提示
				auth: true,
			},
		});
	},
	// 自动签到
	signIn: (data) => {
		return request({
			url: '/examinee/sign-in',
			method: 'POST',
			data,
			custom: {
				showLoading: false,
				auth: true,
				showError: false, // 不展示错误提示
			},
		});
	},
	// 巡考人员签到
	patrolSignIn: (data) => {
		return request({
			url: '/patrol/sign-in',
			method: 'POST',
			data,
			custom: {
				showLoading: false,
				auth: true,
				showError: false, // 不展示错误提示
			},
		});
	},
	// 求助
	help: (data) => {
		return request({
			url: '/examinee/submit',
			method: 'POST',
			data,
			custom: {
				showLoading: false,
				auth: true,
				showSuccess: true,
				successMsg: '已发送!',
				showError: false, // 不展示错误提示
			},
		});
	},
	
};

export default ExamApi;